/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.ufes.pss.exercicioSwingBanco.view;

import javax.swing.JOptionPane;

/**
 *
 * @author OdairJT
 */
public class DefinirAgenciasGerenteView extends javax.swing.JFrame {

    /**
     * Creates new form DefinirRegionaisDiretor
     */
    public DefinirAgenciasGerenteView() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlBarraBotoes = new javax.swing.JPanel();
        btnFechar = new javax.swing.JButton();
        btnExcluir = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblAgencias = new javax.swing.JTable();
        cmbEstados = new javax.swing.JComboBox();
        btnAdicionar = new javax.swing.JButton();
        cmbAgencias = new javax.swing.JComboBox();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("DEFINIR AGÊNCIAS GERENTE");

        pnlBarraBotoes.setBackground(new java.awt.Color(204, 204, 204));

        btnFechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/CancelImagem.gif"))); // NOI18N
        btnFechar.setText("Fechar");

        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/DeleteImagem.gif"))); // NOI18N
        btnExcluir.setText("Excluir");

        org.jdesktop.layout.GroupLayout pnlBarraBotoesLayout = new org.jdesktop.layout.GroupLayout(pnlBarraBotoes);
        pnlBarraBotoes.setLayout(pnlBarraBotoesLayout);
        pnlBarraBotoesLayout.setHorizontalGroup(
            pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, pnlBarraBotoesLayout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(btnExcluir)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnFechar)
                .addContainerGap())
        );
        pnlBarraBotoesLayout.setVerticalGroup(
            pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBarraBotoesLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btnFechar)
                    .add(btnExcluir))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tblAgencias.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "CÓDIGO", "CIDADE", "ESTADO"
            }
        ));
        jScrollPane1.setViewportView(tblAgencias);

        cmbEstados.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " ", "AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PR", "PB", "PA", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SE", "SP", "TO" }));

        btnAdicionar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/NewImagem.gif"))); // NOI18N
        btnAdicionar.setText("Adicionar");

        cmbAgencias.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " ", " " }));
        cmbAgencias.setEnabled(false);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(cmbEstados, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 86, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(cmbAgencias, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnAdicionar)
                .addContainerGap())
            .add(pnlBarraBotoes, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(jScrollPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(cmbEstados, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btnAdicionar)
                    .add(cmbAgencias, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 95, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnlBarraBotoes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdicionar;
    private javax.swing.JButton btnExcluir;
    private javax.swing.JButton btnFechar;
    private javax.swing.JComboBox cmbAgencias;
    private javax.swing.JComboBox cmbEstados;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnlBarraBotoes;
    private javax.swing.JTable tblAgencias;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the btnAdicionar
     */
    public javax.swing.JButton getBtnAdicionar() {
        return btnAdicionar;
    }

    /**
     * @return the btnExcluir
     */
    public javax.swing.JButton getBtnExcluir() {
        return btnExcluir;
    }

    /**
     * @return the btnFechar
     */
    public javax.swing.JButton getBtnFechar() {
        return btnFechar;
    }

    /**
     * @return the cmbEstados
     */
    public javax.swing.JComboBox getCmbEstados() {
        return cmbEstados;
    }

    /**
     * @return the cmbAgencias
     */
    public javax.swing.JComboBox getCmbAgencias() {
        return cmbAgencias;
    }

    /**
     * @return the jScrollPane1
     */
    public javax.swing.JScrollPane getjScrollPane1() {
        return jScrollPane1;
    }

    /**
     * @return the pnlBarraBotoes
     */
    public javax.swing.JPanel getPnlBarraBotoes() {
        return pnlBarraBotoes;
    }

    /**
     * @return the tblAgencias
     */
    public javax.swing.JTable getTblAgencias() {
        return tblAgencias;
    }

    public void showMessage(String pMessage) {
        JOptionPane.showMessageDialog(this, pMessage);
    }

    public int showConfirmMessage(String pTitulo, String pMessage) {
        return JOptionPane.showConfirmDialog(this, pMessage, pTitulo, JOptionPane.YES_NO_OPTION);
    }
}
